import api from '@/utils/request'

export const getServerList = () => {
  return api.get('/WebShell/connectServer/getAllConnectList')
}

export const addServer = (data:any) => {
    return api.post('/WebShell/connectServer/addItem', data)
  }
export const editConnectServerInfo = (data:any) => {
    return api.post('/WebShell/connectServer/updateItem', data)
}

export const deleteServerById = (id:string) => {
    return api.post('/WebShell/connectServer/deleteItem', null,{
        params: {
            Id: id // 注意这里的'Id'要与后端@RequestParam("Id")对应
        }
    })
}